<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');

    // 运单列表
    $router->resource('/waybills', 'WaybillController')->names('admin.waybill.list');

    // 商品管理
    $router->resource('/goods', 'GoodsController')->names('admin.goods.list');

    // 基本设置
    $router->resource('/setting', 'SettingController')->names('admin.setting.base');
    $router->post('setting/save', 'SettingController@setting')->name('admin.setting.base.save');

});
